//
//  Community_TopicWithImgCell.m
//  Pianke
//
//  Created by BetaTheta on 16/1/21.
//  Copyright © 2016年 BetaTheta. All rights reserved.
//

#import "Community_TopicWithImgCell.h"

@interface Community_TopicWithImgCell ()
@property (nonatomic, retain) UIImageView *commentImg;
@end
@implementation Community_TopicWithImgCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //
        self.titleLabel = [[UILabel alloc] init];
        //        _title.backgroundColor = [UIColor redColor];
        _titleLabel.font = [UIFont systemFontOfSize:22];
        _titleLabel.numberOfLines = 0;
        [self.contentView addSubview:_titleLabel];
        
        self.iconImg = [[UIImageView alloc] init];
        //        _coverimg.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_iconImg];
        
        self.contentLabel = [[UILabel alloc] init];
        //        _content.backgroundColor = [UIColor blueColor];
        _contentLabel.numberOfLines = 0;
        _contentLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:_contentLabel];
        
        self.timeLabel = [[UILabel alloc] init];
        //        _time.backgroundColor = [UIColor magentaColor];
        _timeLabel.textColor = [UIColor lightGrayColor];
        _timeLabel.font = [UIFont systemFontOfSize:11];
        
        [self.contentView addSubview:_timeLabel];
        
        self.commentImg = [[UIImageView alloc] init];
        _commentImg.image = [UIImage imageNamed:@"icon_pinglun"];
        //        _commentView.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:_commentImg];
        
        self.commentLabel = [[UILabel alloc] init];
        //        _commentCounter.backgroundColor = [UIColor yellowColor];
        _commentLabel.textColor = [UIColor lightGrayColor];
        _commentLabel.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:_commentLabel];
        
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _titleLabel.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 20, 80);
    _iconImg.frame = CGRectMake(10, 110, 100, 140);
    _contentLabel.frame = CGRectMake(130, 90, _titleLabel.frame.size.width - 120, 180);
    _timeLabel.frame = CGRectMake(10, 290, 80, 20);
    _commentImg.frame = CGRectMake(285, 290, 20, 20);
    _commentLabel.frame = CGRectMake(325, 290, 40, 20);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
